﻿@using QDT.Common
@using QDT.MVC
@using QDT.Web
@model QDT.Core.Members.User
@{
    ViewBag.Title = "安全中心";
    var hasBank = Html.F().GetUserHasBank(Model.ID);
    var safeLevel = Html.F().GetUserSafeLevel(Model);
}
<link href="/Content/Default/CSS/Safe_Center.css" rel="stylesheet" type="text/css" />
@Html.Action("_UserBanner")
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-grid-row">
            @Html.Action("UserMenu", new { route = MenuRoute.SafeCenter })
            <div class="ui-grid-20">
                <div class="ui-box">
                    <div style="font-size: 16px; font-weight: bold;">
                        尊敬的众禧贷用户
                    </div>
                    <div style="height: 109px; border-bottom: 1px solid #f6f6f6;">
                        <ul class="ui-SafeImage">
                            <li>您的账户安全等级</li>
                            <li style="margin-left: 30px;">
                                <div style="background-color: #f1f1f1; margin-top: 2px; box-shadow: inset 0 1px 2px #ccc;
                                    width: 500px; height: 20px; border-radius: 10px;">
                                    <div style="width: @safeLevel%; height: 20px; border-radius: 10px; background: url(/Content/Default/Images/safe_img.png) repeat-x">
                                    </div>
                                </div>
                            </li>
                            <li style="margin-left: 30px;">
                                
                                @if (safeLevel < 80)
                                {
                                    <text>低</text>
                                }
                                else if (safeLevel < 90)
                                {
                                    <text>中</text>
                                }
                                else if (safeLevel == 100)
                                {
                                    <text>高</text>
                                }
                                
                            </li>
                        </ul>
                    </div>
                    <div class="ui-tab">
                        <ul class="ui-tab-items">
                            <li class="ui-tab-item-yhzl">账户资料</li><li class="ui-tab-item-shu">|</li>
                            <li><a href="@Url.Action("PrivacyProtect")">保护隐私安全</a></li>
                        </ul>
                    </div>
                    <div class="ui-table-container">
                        <table>
                            <tbody style="font-size: 15px;">
                                <tr>
                                    <td class="tdone">
                                        用户名
                                    </td>
                                    <td class="tdtwo">
                                        @Model.UserName
                                    </td>
                                    <td class="tdthree">
                                        &nbsp;
                                    </td>
                                    <td class="tdfour" align="center" style="width: 100px;">
                                        不可修改
                                    </td>
                                </tr>
                                <tr style="border-bottom: 1px dashed #ccc">
                                    <td class="tdone">
                                        登录密码
                                    </td>
                                    <td class="tdtwo">
                                        ******
                                    </td>
                                    <td class="tdthree">
                                        &nbsp;
                                    </td>
                                    <td class="tdfour">
                                        <center>
                                            <a href="@Url.Action("Account", "User")">
                                                <div class="Mycolor">
                                                    修改
                                                </div>
                                            </a>
                                        </center>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdone">
                                        真实姓名
                                    </td>
                                    <td class="tdtwo">
                                        @(string.IsNullOrEmpty(@Model.RealName) ? "-" : @Model.RealName)
                                    </td>
                                    <td class="tdthree" rowspan="2">
                                        只有完成实名认证才能充值、投资和提现
                                    </td>
                                    <td class="tdfour" style="border-bottom: 1px dashed #ccc;" rowspan="2">
                                        @if (Model.IDCardPassed)
                                        {
                                            <span>不可修改</span>
                                        }
                                        else
                                        {
                                            <a href="@Url.Action("BindIdCard", "User")">
                                                <center>
                                                    <div class="Mycolor">绑定</div>
                                                </center>
                                            </a>
                                        }
                                    </td>
                                </tr>
                                <tr style="border-bottom: 1px dashed #ccc;">
                                    <td class="tdone">
                                        身份认证
                                    </td>
                                    <td class="tdtwo">
                                        @(Model.IDCardPassed ? @Model.IDCard.ToConfuse(0, 4, 10) : "未绑定")
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdone">
                                        绑定手机
                                    </td>
                                    <td class="tdtwo">
                                        @(Model.MobilePassed ? @Model.Mobile.ToConfuse(3, 4, 4) : "未绑定")
                                    </td>
                                    <td class="tdthree">
                                        账户资金变动实时通知
                                    </td>
                                    <td class="tdfour">
                                        <a href="@Url.Action("BindPhone", "User")">
                                            <center>
                                                <div class="Mycolor">@(Model.MobilePassed ? "修改" : "绑定")</div>
                                            </center>
                                        </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdone">
                                        绑定邮箱
                                    </td>
                                    <td class="tdtwo">
                                        @(Model.EmailPassed ? @Model.Email.ToConfuse(2, 8, 4) : "未绑定")
                                    </td>
                                    <td class="tdthree">
                                        获取账户信息变动通知
                                    </td>
                                    <td class="tdfour">
                                        <a href="@Url.Action("BindEmail", "User")" style="color:#d52d18">
                                            <center>
                                                <div class="Mycolor">@(Model.EmailPassed ? "修改" : "绑定")</div>
                                            </center>
                                        </a>
                                    </td>
                                </tr>
                                <tr style="border-bottom: 1px dashed #ccc;">
                                    <td class="tdone">
                                        绑定银行卡
                                    </td>
                                    <td class="tdtwo">
                                        @(@hasBank > 0 ? "已绑定" : "未绑定")
                                    </td>
                                    <td class="tdthree">
                                        必须实名认证的姓名办理的银行卡、提现使用
                                    </td>
                                    <td class="tdfour">
                                        <a href="@Url.Action("BindBankCard")">
                                            <center>
                                                <div class="Mycolor">
                                                    绑定</div>
                                            </center>
                                        </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdone">
                                        支付密码
                                    </td>
                                    <td class="tdtwo">
                                        @(Model.SafePasswordPassed ? "已验证" : "未验证")
                                    </td>
                                    <td class="tdthree">
                                        提现时所输入的密码
                                    </td>
                                    <td class="tdfour">
                                        <a href="@Url.Action("SafePassword")">
                                            <center>
                                                <div class="Mycolor">@(Model.SafePasswordPassed ? "修改" : "验证")</div>
                                            </center>
                                        </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="tdone">
                                        紧急联系人
                                    </td>
                                    <td class="tdtwo">
                                       @(string.IsNullOrEmpty(Model.UrgentPerson) ? "未绑定" : @Model.UrgentPerson)<br />
                                       @(string.IsNullOrEmpty(Model.UrgentMobile) ? "" : @Model.UrgentMobile)
                                    </td>
                                    <td class="tdthree">
                                        在紧急情况下能够被联系到的与当事人相关的人
                                    </td>
                                    <td class="tdfour">
                                        <a href="@Url.Action("UrgentContact", "User", new { userid = Model.ID })">
                                            <center>
                                                <div class="Mycolor">
                                                     @(string.IsNullOrEmpty(Model.UrgentMobile) ? "绑定" : "修改")</div>
                                            </center>
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="margin-top: -5px;">@Html.Partial("_BindBottomImage")</div>
<script type="text/javascript">
    $().ready(function () {
        $("#Safe_Center").css("background", "#e0524b");
        $("#Safe_Center i,#Safe_Center span").css("color", "white");
        $("#Safe_Center .san-jiaoxing").css("display", "block");
    });
</script>
